<!DOCTYPE html>
<html>

	<head>
		<title>MapGuide untiled example</title>
		<script src="js/jquery.js"></script>
		<link rel="stylesheet" href="css/bootstrap.css">
		<script src="js/bootstrap.js"></script>
		<link rel="stylesheet" href="css/ol.css" type="text/css">
		<script src="js/ol-debug-wo.js"></script>

	</head>

	<body>
		<div class="container-fluid">

			<div class="row-fluid">
				<div class="span12">
					<div id="map" class="map"></div>
				</div>
			</div>

		</div>
		<script>
			//地图图层
			var mapLayer = new ol.layer.Tile({
				source: new ol.source.XYZ({
					projection: "EPSG:4326",
					url: "http://t4.tianditu.com/DataServer?T=vec_c&x={x}&y={y}&l={z}"
				})
			});
			var roadLayer = new ol.layer.Tile({
				source: new ol.source.TileArcGISRest({
					url: "http://10.120.20.122:6080/arcgis/rest/services/topology/网络分析/MapServer"
				})
			});
			var extent;
			var powerLayer = new ol.layer.Image({
				source: new ol.source.ImageWMS({
					url: 'http://10.120.20.100:9666/export',
					params: {
						'VERSION': '1.2.0',
						'MAPID': '10000000000000000000000000000000',
						'FORMAT': 'PNG',
						'LAYERS': '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,90,91,92,93,94,95,96,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,117,118,119,120,121,122,123,124',
					}
				})
			});
			
			var another = new ol.layer.Image({
//				extent: bounds,
				source: new ol.source.ImageMapGuide({
					projection: 'EPSG:4326',
					url: 'http://10.120.20.100:9666/export',
					useOverlay: false,

					params: {
						'VERSION': '1.2.0',
						'MAPID': '10000000000000000000000000000000',
						'FORMAT': 'PNG',
						'LAYERS': '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,90,91,92,93,94,95,96,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,117,118,119,120,121,122,123,124',
					},
					ratio: 2
				})
			});
			var view = new ol.View({
				center: [117.39758, 39.14407], //必需
				projection: "EPSG:4326", //必需
				zoom: 15
			});
			/**
			 * 初始化map
			 */
			var map = new ol.Map({
				layers: [mapLayer, powerLayer],
				target: 'map',
				view: view
			});
			/*new ol.layer.Tile({
					source: new ol.source.MapQuest({
						layer: 'sat'
					})
				}),
				new ol.layer.Image({
					extent: [-13884991, 2870341, -7455066, 6338219],
					source: new ol.source.ImageWMS({
						url: 'http://demo.boundlessgeo.com/geoserver/wms',
						imageLoadFunction:function(img){
										img.getImage().src="http://10.120.20.100:9666/export?BBOX=115%2E81613564714912%2C38%2E63971995505849%2C118%2E15036785818056%2C39%2E59729120655677&HEIGHT=786&LAYERS=1%2C2%2C3%2C4%2C5%2C6%2C7%2C8%2C9%2C10%2C11%2C12%2C13%2C14%2C15%2C16%2C17%2C18%2C19%2C20%2C21%2C22%2C23%2C24%2C25%2C26%2C27%2C28%2C29%2C30%2C31%2C32%2C33%2C34%2C35%2C36%2C37%2C38%2C39%2C40%2C41%2C42%2C43%2C44%2C45%2C46%2C47%2C48%2C49%2C50%2C51%2C52%2C53%2C54%2C55%2C56%2C57%2C58%2C59%2C60%2C61%2C62%2C63%2C64%2C65%2C66%2C67%2C68%2C69%2C70%2C71%2C72%2C73%2C74%2C75%2C76%2C77%2C78%2C79%2C80%2C81%2C82%2C83%2C84%2C85%2C86%2C87%2C88%2C90%2C91%2C92%2C93%2C94%2C95%2C96%2C98%2C99%2C100%2C101%2C102%2C103%2C104%2C105%2C106%2C107%2C108%2C109%2C110%2C111%2C112%2C113%2C114%2C117%2C118%2C119%2C120%2C121%2C122%2C123%2C124&WIDTH=1916&MAPID=10000000000000000000000000000000&FORMAT=PNG"
									},
						params: {
							'LAYERS': 'topp:states'
						},
						serverType: 'geoserver'
					})
				})
			];
			var map = new ol.Map({
				layers: layers,
				target: 'map',
				view: new ol.View({
					center: [-10997148, 4569099],
					zoom: 4
				})
			});*/
		</script>
	</body>

</html>